/*setting must fall within the range of descriptor min and max*/
setting->weight = (coord->weight < descriptor->weight.maxValue) ? coord->weight: descriptor->weight.maxValue;/* min of the maximums*/
setting->weight = (setting->weight > descriptor->weight.minValue) ? setting->weight: descriptor->weight.minValue;/* max of the minimums*/
remaining->weight = coord->weight - setting->weight; /* if positive then we need to add more bolding with a textface, if negative we need to take some away*/
distance += (remaining->weight > 0) ? FixedMultiply(remaining->weight , prefwghtweighting): -FixedMultiply(remaining->weight , prefwghtweighting);/*absolute value for distance metric */
setting->width = (coord->width < descriptor->width.maxValue) ? coord->width: descriptor->width.maxValue;/* min of the maximums*/
setting->width = (setting->width > descriptor->width.minValue) ? setting->width: descriptor->width.minValue;/* max of the minimums*/
remaining->width = coord->width - setting->width; /* if positive then we need to extend via textface, if negative we need to condense*/
distance += (remaining->width > 0) ? FixedMultiply(remaining->width , prefwdthweighting): -FixedMultiply(remaining->width , prefwdthweighting);/*absolute value for distance metric */
setting->slant = (coord->slant < descriptor->slant.maxValue) ? coord->slant: descriptor->slant.maxValue;/* min of the maximums*/
setting->slant = (setting->slant > descriptor->slant.minValue) ? setting->slant: descriptor->slant.minValue;/* max of the minimums*/
remaining->slant = coord->slant - setting->slant; /* if positive then we need to skew clockwise via textface, if negative we need to skew counter clockwise*/
/*actually, if there is any slant at all in the coord->slant then we don't want to make an italic gxFont more italic*/
distance += (remaining->slant > 0) ? FixedMultiply(remaining->slant, prefslntweighting): -FixedMultiply(remaining->slant, prefslntweighting);/*absolute value for distance metric this is naturally weighted to be last pref*/
/* could use something like this and then weight it??? distance += FixedDivide(remaining->slant, ff(90) ); */